negotiator.boaframework
Class OfferingStrategy

java.lang.Object
  extended by negotiator.boaframework.OfferingStrategy
Direct Known Subclasses:
AgentFSEGA_Offering, AgentK_Offering, AgentK2_Offering, AgentSmith_Offering, ANAC2013BOAExample_Offering, BRAMAgent_Offering, ChoosingAllBids, Gahboninho_Offering, GeniusTimeDependent_Offering, HardHeaded_Offering, IAMCrazyHaggler_Offering, IAMHaggler_Test_Offering, IAMhaggler2010_Offering, IAMhaggler2011_Offering, NiceTitForTat_Offering, Nozomi_Offering, Random_Offering, TheNegotiator_Offering, TimeDependent_Offering, ValueModelAgent_Offering, Yushu_Offering

public abstract class OfferingStrategy
extends java.lang.Object

Describes a bidding strategy of an agent of the BOA framework. Tim Baarslag, Koen Hindriks, Mark Hendrikx, Alex Dirkzwager and Catholijn M. Jonker. Decoupling Negotiating Agents to Explore the Space of Negotiation Strategies

Version:
15-12-11
Author:
Alex Dirkzwager, Mark Hendrikx

Field Summary
protected  boolean endNegotiation
          Boolean to see if endNegotiation is called
protected  SharedAgentState helper
          Reference to helper class used if there are dependencies between the acceptance condition an offering strategy
protected  NegotiationSession negotiationSession
          Reference to the negotiation session
protected  BidDetails nextBid
          The next bid the agent plans to present
protected  OMStrategy omStrategy
          Reference to the opponent model strategy
protected  OpponentModel opponentModel
          Reference to the opponent model
 
Constructor Summary
OfferingStrategy()
           
 
Method Summary
abstract  BidDetails determineNextBid()
          Determines the next bid the agent will offer to the opponent
abstract  BidDetails determineOpeningBid()
          Determines the first bid to be offered by the agent
 void endSession(NegotiationResult result)
          Method called at the end of the negotiation.
 SharedAgentState getHelper()
          Return the Helper-object.
 BidDetails getNextBid()
           
 void init(NegotiationSession negotiationSession, OpponentModel opponentModel, OMStrategy omStrategy, java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          Initializes the offering strategy.
 boolean isEndNegotiation()
           
 java.io.Serializable loadData()
          Method used to load the saved object, possibly created in a previous negotiation session.
 void setNextBid(BidDetails nextBid)
          Set the next bid of the agent.
 void storeData(java.io.Serializable object)
          Method used to store data that should be accessible in the next negotiation session on the same scenario.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextBid

protected BidDetails nextBid
The next bid the agent plans to present


negotiationSession

protected NegotiationSession negotiationSession
Reference to the negotiation session


opponentModel

protected OpponentModel opponentModel
Reference to the opponent model


omStrategy

protected OMStrategy omStrategy
Reference to the opponent model strategy


helper

protected SharedAgentState helper
Reference to helper class used if there are dependencies between the acceptance condition an offering strategy


endNegotiation

protected boolean endNegotiation
Boolean to see if endNegotiation is called

Constructor Detail

OfferingStrategy

public OfferingStrategy()
Method Detail

init

public void init(NegotiationSession negotiationSession,
                 OpponentModel opponentModel,
                 OMStrategy omStrategy,
                 java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          throws java.lang.Exception
Initializes the offering strategy. If parameters are used, this method should be overridden.

Parameters:
negotiationSession - state of the negotiation.
opponentModel - opponent model which may be used.
omStrategy - opponent model strategy which may be used.
parameters - optional parameters for the offering strategy.
Throws:
java.lang.Exception - if the offering strategy fails to initialize.

determineOpeningBid

public abstract BidDetails determineOpeningBid()
Determines the first bid to be offered by the agent

Returns:
the opening bid of the agent.

determineNextBid

public abstract BidDetails determineNextBid()
Determines the next bid the agent will offer to the opponent

Returns:
bid to offer to the opponent.

getNextBid

public BidDetails getNextBid()
Returns:
next bid to be offered to the opponent.

setNextBid

public void setNextBid(BidDetails nextBid)
Set the next bid of the agent. This method is automatically called by the BOA framework.

Parameters:
nextBid - to offer to the opponent.

getHelper

public SharedAgentState getHelper()
Return the Helper-object. A helper is used to hold the code shared between the offering strategy and acceptance strategy. A good design does not require a helper.

Returns:
helper with shared code.

isEndNegotiation

public boolean isEndNegotiation()
Returns:
true if the negotiation should be ended.

storeData

public final void storeData(java.io.Serializable object)
Method used to store data that should be accessible in the next negotiation session on the same scenario. This method can be called during the negotiation, but it makes more sense to call it in the endSession method.

Parameters:
object - to be saved by this component.

loadData

public final java.io.Serializable loadData()
Method used to load the saved object, possibly created in a previous negotiation session. The method returns null when such an object does not exist yet.

Returns:
saved object or null when not available.

endSession

public void endSession(NegotiationResult result)
Method called at the end of the negotiation. Ideal location to call the storeData method to update the data to be saved.

Parameters:
result - of the negotiation.